import { getAction, postAction, downFile, postFormData, uploadAction } from '@/api/manage'

// 欢迎语 新增/编辑
const saveOrUpdateWelcome = params => postAction('/backend/qrcode/saveOrUpdateWelcome', params)

// 欢迎语详情-复制
const getWelcomeVoById = params => getAction('/backend/qrcode/getWelcomeVoById', params)

const pageWelcomeVo = params => getAction('/backend/qrcode/pageWelcomeVo', params)

// 门店包
const getAllStorePkg = params => getAction('/backend/qrcode/getAllStorePkg', params)

// 门店包设置欢迎语
const setStorePkgWelcome = params => getAction('/backend/qrcode/setStorePkgWelcome', params)

//欢迎语-删除
const removeWelcomeById = params => getAction('/backend/qrcode/removeWelcomeById', params)

//欢迎语兜底规则
const DefaultWelcomeVo = params => getAction('/backend/qrcode/getDefaultWelcomeVo', params)

//企业微导购码同步数据
const syncData = params => getAction('/backend/qrcode/syncData', params)

//企业微导购码 欢迎语规则下拉选
const AllCpWelcome = params => getAction('/backend/qrcode/getAllCpWelcome', params)

//企业微导购码设置 欢迎语规则
const setWelcomeBatch = params => getAction('/backend/qrcode/setWelcomeBatch', params)

//企微聚合码 新增或修改
const saveOrUpdateGather = params => postAction('/backend/qrcode/saveOrUpdateGather', params)

//企微聚合码删除
const delGatherById = params => getAction('/backend/qrcode/delGatherById', params)

//多人码删除
const delCrowdById = params => getAction('/backend/qrcode/delCrowdById', params)

//企微聚合码获取详情
const getGatherById = params => getAction('/backend/qrcode/getGatherById', params)

//企微聚合码应用场景
const pagQrcodeSceneLog = params => getAction('/backend/qrcode/pagQrcodeSceneLog', params)

//多人码分页
const pageCrowdVo = params => getAction('/backend/qrcode/pageCrowdVo', params)

//多人码新增或修改
const saveOrUpdateCrowd = params => postAction('/backend/qrcode/saveOrUpdateCrowd', params)

//多人获取详情
const getCrowdVoById = params => getAction('/backend/qrcode/getCrowdVoById', params)

//适用小程序下拉
const brandList = params => getAction('/backend/vip/invite/brandList', params)

//部门树形
const departmentTree = params => getAction('/backend/qrcode/departmentTree', params)

//根据部门获取人员
const getMemberListByDepId = params => getAction('/backend/qrcode/getMemberListByDepId', params)

// 获取人员下拉
const memberListByName = params => getAction('/backend/qrcode/getMemberListByName', params)

//企微导购码 下载员工二维码
const downloadQrcode = params => getAction('/backend/qrcode/downloadQrcode', params)

//下载中心 分页查询
const pageDownloadVo = params => getAction('/backend/qrcode/pageDownloadVo', params)

//下载中心 分页查询
const downloadCrowdQrcode = params => getAction('/backend/qrcode/downloadCrowdQrcode', params)

//企微导购码 批量下载二维码
const downloadQrcodeBatch = params => getAction('/backend/qrcode/downloadQrcodeBatch', params)

// 批量导入人员
const ImportMember = (params) => uploadAction('/backend/qrcode/ImportMember', params)

// 批量导入人员的失败数据导出
const exportMember = params => downFile('/backend/qrcode/exportMember', params)

// 人员导入分页查询
const pageImportMemberVo = params => getAction('/backend/qrcode/pageImportMemberVo', params)

// 人员导入删除
const delImportMember = params => getAction('/backend/qrcode/delImportMember', params)

// 人员导入 批量设置规则
const setImportMemberWelcome = params => getAction('/backend/qrcode/setImportMemberWelcome', params)

export {
  saveOrUpdateGather,
  downloadCrowdQrcode,
  saveOrUpdateCrowd,
  getGatherById,
  delCrowdById,
  getCrowdVoById,
  pagQrcodeSceneLog,
  delGatherById,
  pageCrowdVo,
  brandList,
  departmentTree,
  getMemberListByDepId,
  saveOrUpdateWelcome,
  getWelcomeVoById,
  removeWelcomeById,
  DefaultWelcomeVo,
  syncData,
  AllCpWelcome,
  setWelcomeBatch,
  downloadQrcode,
  pageDownloadVo,
  downloadQrcodeBatch,
  getAllStorePkg,
  setStorePkgWelcome,
  pageWelcomeVo,
  ImportMember,
  exportMember,
  pageImportMemberVo,
  delImportMember,
  setImportMemberWelcome,
  memberListByName
}
